@tailwind base;
@tailwind components;
@tailwind utilities;

/* 视频分析平台设计系统 - 专业蓝色主题 */

@layer base {
  :root {
    --background: 240 10% 98%;
    --foreground: 225 50% 15%;

    --card: 0 0% 100%;
    --card-foreground: 225 50% 15%;

    --popover: 0 0% 100%;
    --popover-foreground: 225 50% 15%;

    --primary: 214 88% 55%;
    --primary-foreground: 0 0% 100%;

    --primary-glow: 214 95% 68%;
    --primary-deep: 214 90% 45%;

    --secondary: 220 30% 96%;
    --secondary-foreground: 225 50% 20%;

    --muted: 220 15% 95%;
    --muted-foreground: 225 25% 55%;

    --accent: 214 30% 90%;
    --accent-foreground: 225 50% 20%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    --success: 142 76% 36%;
    --success-foreground: 0 0% 100%;

    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;

    --border: 220 25% 88%;
    --input: 220 25% 88%;
    --ring: 214 88% 55%;

    /* 渐变设计 */
    --gradient-primary: linear-gradient(
      135deg,
      hsl(214 88% 55%),
      hsl(214 95% 68%)
    );
    --gradient-secondary: linear-gradient(
      135deg,
      hsl(220 30% 96%),
      hsl(220 15% 95%)
    );
    --gradient-hero: linear-gradient(
      135deg,
      hsl(214 90% 45%),
      hsl(214 88% 55%),
      hsl(214 95% 68%)
    );

    /* 阴影设计 */
    --shadow-elegant: 0 10px 30px -10px hsl(214 88% 55% / 0.2);
    --shadow-card: 0 4px 20px -4px hsl(214 88% 55% / 0.1);
    --shadow-button: 0 4px 12px -2px hsl(214 88% 55% / 0.25);

    /* 动画 */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    --radius: 0.5rem;

    --sidebar-background: 0 0% 98%;

    --sidebar-foreground: 240 5.3% 26.1%;

    --sidebar-primary: 240 5.9% 10%;

    --sidebar-primary-foreground: 0 0% 98%;

    --sidebar-accent: 240 4.8% 95.9%;

    --sidebar-accent-foreground: 240 5.9% 10%;

    --sidebar-border: 220 13% 91%;

    --sidebar-ring: 217.2 91.2% 59.8%;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;

    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;

    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;

    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;

    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;

    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;

    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;

    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
    --sidebar-background: 240 5.9% 10%;
    --sidebar-foreground: 240 4.8% 95.9%;
    --sidebar-primary: 224.3 76.3% 48%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 240 3.7% 15.9%;
    --sidebar-accent-foreground: 240 4.8% 95.9%;
    --sidebar-border: 240 3.7% 15.9%;
    --sidebar-ring: 217.2 91.2% 59.8%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground;
  }
}

.PopoverContent {
  border-radius: 4px;
  padding: 20px;
  width: 260px;
  background-color: white;
  box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px,
    hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
  animation-duration: 400ms;
  animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}
.PopoverContent:focus {
  box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px,
    hsl(206 22% 7% / 20%) 0px 10px 20px -15px, 0 0 0 2px var(--violet-7);
}
.PopoverContent[data-state="open"][data-side="top"] {
  animation-name: slideDownAndFade;
}
.PopoverContent[data-state="open"][data-side="right"] {
  animation-name: slideLeftAndFade;
}
.PopoverContent[data-state="open"][data-side="bottom"] {
  animation-name: slideUpAndFade;
}
.PopoverContent[data-state="open"][data-side="left"] {
  animation-name: slideRightAndFade;
}
